module.exports = {
  /**
   * 海报购买记录
   * @url user/kh/postOrderConfig 前端调用的url参数地址
   */
  main: async (event) => {
    let {
      data = {}, userInfo, util, originalParam
    } = event;
    let {
      uniID,
      pubFun,
      vk,
      db,
      _
    } = util;
    let res = {
      code: 0,
      msg: 'ok'
    };
    let dbName = "vk-message"

    let {
      ids
    } = data
    if (ids.length > 0) {
      for (let i= 0; i < ids.length; i++) {
        await vk.baseDao.update({
          dbName,
          whereJson: {
            _id: ids[i]
          },
          dataJson: {
            status: 2
          }
        }, event.util);
      }
    }
    return res
    
  }

}